package cn.zz.veggie.application.packer;

import cn.zz.veggie.model.domain.DelMan;
import cn.zz.veggie.web.types.vo.his.user.HisDelManVo;
import cn.zz.veggie.web.types.vo.mgmt.user.MgmtDelManVo;

/**
 * @author zhongq
 * @since 2024/7/14
 */
public class DelManPacker {

	public static HisDelManVo toHisDelManVo(DelMan delMan) {
		final HisDelManVo vo = new HisDelManVo();
		vo.setId(delMan.getId());
		vo.setUsername(delMan.getUsername());
		return vo;
	}

	public static MgmtDelManVo toMgmtDelManVo(DelMan delMan) {
		final MgmtDelManVo vo = new MgmtDelManVo();
		vo.setId(delMan.getId());
		vo.setUsername(delMan.getUsername());
		vo.setMobile(delMan.getMobile());
		vo.setCreatedAt(delMan.getCreatedAt());
		vo.setUpdatedAt(delMan.getUpdatedAt());
		return vo;
	}
}